<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * Class Task
 * @package App\Model
 * @property mixed|int id
 * @property mixed|int task_id
 * @property mixed|int cooperative_id
 * @property mixed|int user_id
 * @property mixed|int task_exec_id
 * @property mixed|string context
 * @property mixed|int status
 * @property mixed|string created_at
 * @property mixed|string updated_at
 * @property mixed|string deleted_at
 * @property User user
 * @property Task task
 */
class TaskArbitration extends Model
{
    protected $table = 'task_arbitration';

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function task()
    {
        return $this->belongsTo(Task::class, 'task_id', 'id');
    }
}